package com.sunlands.zlcx.usercenter.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * @author zhaocg
 * @create 2019/8/7 17:58
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(value = "用户打卡学习统计VO")
public class PersonalShowSummaryVO implements Serializable {


    private static final long serialVersionUID = 6430679721764289379L;
    @ApiModelProperty(value = "当天总时长")
    private Long sumMinutes; //当天总时长

    @ApiModelProperty(value = "当天打卡次数")
    private Long frequency;  //当天打卡次数

    @ApiModelProperty(value = "第一次开始学习后的总时长")
    private Long totalSumMinutes; //第一次开始学习后的总时长

    @ApiModelProperty(value = "打卡总次数")
    private Long totalFrequency;  //打开总次数

    @ApiModelProperty(value = "日均时长")
    private Double avgSumMinutes;   //日均时长



    public Long getSumMinutes() {
        return sumMinutes != null ? sumMinutes : 0;
    }

    public Long getFrequency() {
        return frequency != null ? frequency : 0;
    }

    public Long getTotalSumMinutes() {
        return totalSumMinutes != null ? totalSumMinutes : 0;
    }

    public Long getTotalFrequency() {
        return totalFrequency != null ? totalFrequency : 0;
    }

    public Double getAvgSumMinutes() {
        return avgSumMinutes != null ? avgSumMinutes : 0D;
    }
}
